package com.alan.controller;

import com.alan.domain.ResponseResult;
import com.alan.service.OssUploadService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
public class UploadController {

    @Resource
    private OssUploadService ossUploadService;

    @PostMapping("/upload")
    public ResponseResult uploadImg(MultipartFile img){
        return ossUploadService.loadImg(img);
    }
}
